/* Copyright (c) 2011 Team A CS2340. All rights reserved.*/

package edu.gatech.teama.doctorsoffice.net;



import edu.gatech.teama.doctorsoffice.server.DataModel;

/**
 * Get all appointments for a patient
 * @author Team A
 * @version $Revision: 1.0 $
 *
 */
public class LookupAllPatientsAppointmentsMessage extends Message{

	/**
	 * Get appointmets for a user
	 * @param username user to get appointments for
	 */
	public LookupAllPatientsAppointmentsMessage(String username) {
		super(username);
		// TODO Auto-generated constructor stub
	}
	
	public Message handle(final DataModel model){ // $codepro.audit.disable methodJavadoc
		return new AppointmentListMessage(
				model.getAppointmentsForUser((String) this.getPayload()));
	}

	public String toString() { // $codepro.audit.disable methodJavadoc
		return this.getPayload().toString();
	}
	
}
